﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ListMessage.ascx.cs"
    Inherits="Presentation.UserControl.ListMessage" %>
<table border="0" cellpadding="0" cellspacing="0" id="content-table" width="100%">
    <tr>
        <th rowspan="3" class="sized">
            <img src="/Content/images/shared/side_shadowleft.jpg" width="20" height="300" alt="" />
        </th>
        <th class="topleft">
        </th>
        <td id="tbl-border-top">
            &nbsp;
        </td>
        <th class="topright">
        </th>
        <th rowspan="3" class="sized">
            <img src="/Content/images/shared/side_shadowright.jpg" width="20" height="300" alt="" />
        </th>
    </tr>
    <tr>
        <td id="tbl-border-left">
        </td>
        <td>
            <!--  start content-table-inner -->
            <div id="content-table-inner">
                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td>
                            <asp:ListView runat="server" ID="MessageListView">
                                <LayoutTemplate>
                                    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
                                        <tr>
                                            <th class="table-header-repeat line-left" style="width:10%">
                                                <a>From</a>
                                            </th>
                                            <th class="table-header-repeat line-left" style="width:70%">
                                                <a>Title</a>
                                            </th>
                                            <th class="table-header-repeat line-left" style="width:20%">
                                                <a>Send date</a>
                                            </th>
                                        </tr>
                                        <tbody>
                                            <asp:PlaceHolder runat="server" ID="itemPlaceHolder"></asp:PlaceHolder>
                                        </tbody>
                                    </table>
                                </LayoutTemplate>
                                <ItemTemplate>
                                        <tr class='<%# (System.Boolean)Eval("IsRead") ? "mail-unread" : "mail-read" %>'>
                                            <td>
                                                <asp:Label runat="server"  Font-Bold='<%# (System.Boolean)Eval("IsRead") ? false : true %>' Text='<%# Eval("From.Username") %>' />
                                            </td>
                                            <td>
                                                <asp:HyperLink NavigateUrl='<%# "../Inbox.aspx?mid="+ Eval("MessageId") %>' Font-Bold='<%# (System.Boolean)Eval("IsRead") ? false : true %>' Text='<%# Eval("Title") %>' runat="server" />
                                            </td>
                                            <td>
                                                <asp:Label runat="server" Font-Bold='<%# (System.Boolean)Eval("IsRead") ? false : true %>' Text='<%# Eval("SendDate") %>' />
                                            </td>
                                        </tr>
                                </ItemTemplate>
                                <EmptyDataTemplate>
                                    You haven't received any mail yet
                                </EmptyDataTemplate>
                            </asp:ListView>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:DataPager ID="ClientDataPager" runat="server" PagedControlID="MessageListView"
                                PageSize="10" QueryStringField="page">
                                <Fields>
                                    <asp:NextPreviousPagerField FirstPageImageUrl="~/Content/Images/table/paging_far_left.gif"
                                        PreviousPageImageUrl="~/Content/Images/table/paging_left.gif" ButtonType="Button"
                                        ShowLastPageButton="false" ShowPreviousPageButton="true" ShowNextPageButton="false"
                                        ShowFirstPageButton="true" />
                                    <asp:NumericPagerField ButtonCount="5" CurrentPageLabelCssClass="selected-numeric-box"
                                        NumericButtonCssClass="numeric-box" />
                                    <asp:NextPreviousPagerField LastPageImageUrl="~/Content/Images/table/paging_far_right.gif"
                                        NextPageImageUrl="~/Content/Images/table/paging_right.gif" ButtonType="Button"
                                        ShowFirstPageButton="false" ShowNextPageButton="true" ShowLastPageButton="true"
                                        ShowPreviousPageButton="false" />
                                </Fields>
                            </asp:DataPager>
                        </td>
                    </tr>
                </table>
                <div class="clear">
                </div>
            </div>
            <!--  end content-table-inner  -->
        </td>
        <td id="tbl-border-right">
        </td>
    </tr>
    <tr>
        <th class="sized bottomleft">
        </th>
        <td id="tbl-border-bottom">
            &nbsp;
        </td>
        <th class="sized bottomright">
        </th>
    </tr>
</table>
<div class="clear">
    &nbsp;</div>
